home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 242 / 242.d81 / veil of tiers (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  15KB  |  547 lines

  1. 10 poke56,130:clr
  2. 20 dv=peek(186):ifdv<8thendv=8
  3. 30 print"[159]":poke53280,0:poke53281,0
  4. 40 sys57812"vt font",dv,0:poke780,0:poke781,0:poke782,8:sys65493
  5. 50 sys57812"cm-scr-wp-unp",dv,0:poke780,0:poke781,0:poke782,195:sys65493
  6. 52 sys57812"s.vttitle.shp",dv,0:poke780,0:poke781,0:poke782,90:sys65493
  7. 54 poke251,90:poke252,224:poke253,204:sys51456:sys51459
  8. 56 zz=zz+1:geta$:ifa$=""andzz<700then56
  9. 60 sys57812"mrj49152",dv,0:poke780,0:poke781,0:poke782,192:sys65493
  10. 70 sys57812"s.vt.shp",dv,0:poke780,0:poke781,0:poke782,138:sys65493
  11. 78 sys51459
  12. 80 print"[147]":poke53281,0:poke53272,(peek(53272)and240)or2
  13. 90 poke251,138:poke252,224:poke253,204:sys51456:sys51459
  14. 100 poke53280,11:i=rnd(-ti)
  15. 110 sd=54272:fori=0to24:pokesd+i,0:next:pokesd+5,18:pokesd+6,18:pokesd+24,15
  16. 120 pokesd+12,3:pokesd+13,40
  17. 130 gosub5100
  18. 140 un=51456:hg=51459:wp=50944:sc=50176:cm=49920
  19. 150 syssc,224,204,8
  20. 160 goto1030
  21. 170 :
  22. 180 :rem screen save
  23. 190 :
  24. 200 syscm,1024,130*256,1000:syscm,55296,134*256,1000:return
  25. 210 syscm,130*256,1024,1000:syscm,134*256,55296,1000:return
  26. 220 :
  27. 230 :rem text box
  28. 240 :
  29. 250 poke646,c:poke214,y:print
  30. 260 printtab(x)"[176]"left$(tp$,xx)"[174]"
  31. 270 fori=1toyy:printtab(x)"[171]"left$(sp$,xx)"[146][179]":next
  32. 280 printtab(x)"[173]"left$(bt$,xx)"[189]"
  33. 290 return
  34. 300 :
  35. 310 :rem menu box
  36. 320 :
  37. 330 syssc+6,29,11,"[144][146][176][178][178][178][178][178][178][178][174]"
  38. 340 fori=1to4:syssc+6,29,11+i,"[171]       [146][179]":next
  39. 350 syssc+6,29,16,"[173][177][177][177][177][177][177][177][189]"
  40. 360 return
  41. 370 :
  42. 380 :rem shuffle/deal/runes
  43. 390 :
  44. 400 fori=0to5:rr(i)=i:next
  45. 410 fori=0to5:r=int(rnd(1)*6)
  46. 420 t=rr(r):rr(r)=rr(i):rr(i)=t:next
  47. 430 fori=0to6:forj=0to9
  48. 440 pc(i,j)=int(rnd(1)*4):next:next
  49. 450 fori=0to3:ni(6,i)=0:next
  50. 460 fori=0to9:ni(6,pc(6,i))=ni(6,pc(6,i))+1:next
  51. 470 i=0
  52. 480 ifi=ni(6,0)then500
  53. 490 pc(6,i)=0:i=i+1:goto480
  54. 500 ifi=ni(6,0)+ni(6,1)then520
  55. 510 pc(6,i)=1:i=i+1:goto500
  56. 520 ifi=ni(6,0)+ni(6,1)+ni(6,2)then540
  57. 530 pc(6,i)=2:i=i+1:goto520
  58. 540 ifi=10then560
  59. 550 pc(6,i)=3:i=i+1:goto540
  60. 560 return
  61. 570 :
  62. 580 :rem rune parameters
  63. 590 :
  64. 600 fori=0to5:forj=0to2
  65. 610 r(i,j)=int(rnd(1)*(rh(i,j)-rl(i,j)+1)+rl(i,j))
  66. 620 ifj=1thenifr(i,1)=r(i,0)then600
  67. 630 next:next
  68. 640 return
  69. 650 :
  70. 660 :rem evaluate pl's score
  71. 670 :
  72. 680 fori=0to3:ni(pl,i)=0:v(pl,i)=10:next:ps(pl)=0
  73. 690 fori=0to9:ni(pl,pc(pl,i))=ni(pl,pc(pl,i))+1:next
  74. 700 fori=0to5:ifpl=6thenifrg(i)=0then720
  75. 710 oni+1gosub4100,4150,4200,4260,4320,4380
  76. 720 next
  77. 730 fori=0to3:ps(pl)=ps(pl)+v(pl,i)*ni(pl,i):next
  78. 740 return
  79. 750 :
  80. 760 :rem pick four
  81. 770 :
  82. 780 fori=0to9:fl(i)=0:next:co=0
  83. 790 r=int(rnd(1)*10)
  84. 800 iffl(r)then790
  85. 810 tr(co)=r:fl(r)=1:co=co+1:ifco<4then790
  86. 820 return
  87. 830 poke214,15:print:printtab(3)"[149][195]hoose up to four of "pl$(g)"'s"
  88. 840 printtab(3)"ikons and an equal number of     "
  89. 850 printtab(3)"your own for trade.              "
  90. 860 printtab(3)"  [210] - [211]ee the runes you know     "
  91. 870 printtab(3)"  [196] - [196]one. [199]o back to the game  ":return
  92. 880 :
  93. 890 :rem clear ikons
  94. 900 :
  95. 910 poke214,15:print:fori=0to4:printtab(3)"[149]"left$(sp$,34):next:return
  96. 920 :
  97. 930 :
  98. 940 :rem prompt and wait
  99. 950 :
  100. 960 poke214,23:print:printtab(14)"[159][208]ress a key"
  101. 970 poke198,0
  102. 980 geta$:ifa$=""then980
  103. 990 gosub5100:return
  104. 1000 :
  105. 1010 :rem initialize
  106. 1020 :
  107. 1030 dimpc(7,10),ni(7,10),r(6,3),rr(7),rh(6,3),rl(6,3),m$(7),b$(4),ic$(4),pl$(7)
  108. 1040 dimv(7,4),ps(7),gx(6),gy(6),sx(16),sy(16),bb$(4)
  109. 1050 zx(0)=91:zx(1)=93:zx(2)=60:zx(3)=62
  110. 1060 tp$="[178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178][178]"
  111. 1070 sp$="                                        "
  112. 1080 bt$="[177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177]"
  113. 1090 fori=1to4:readm$(i):next
  114. 1100 data" [212][210][193][196][197] "," [210][213][206][197][211] "," [211][212][207][210][217] "," [195][197][193][211][197] "
  115. 1110 fori=1to4:readm1$(i):next
  116. 1120 data" [211][195][207][210][197] "," [210][213][206][197][211] "," [201][203][207][206][211] "," [194][197][199][201][206] "
  117. 1130 b$(0)="[158]#$[157][157]%&":b$(1)="[158][220][221][157][157]^[223]":b$(2)="[158][160][161][157][157][162][163]":b$(3)="[158][164][165][157][157][166][167]"
  118. 1140 bb$(0)="#$[157][157]%&":bb$(1)="[220][221][157][157]^[223]":bb$(2)="[160][161][157][157][162][163]":bb$(3)="[164][165][157][157][166][167]"
  119. 1150 fori=0to6:readpl$(i):next
  120. 1160 data"[202][193][196][193][215][201][206]","[195][200][210][217][211][197][201][211]","[210][197][196] [207][210][195]","[193][206][193][206][193]","[203][201][195][203][193][200][193]","[208][207][196][193][210][199][197]","[208][204][193][217][197][210]"
  121. 1170 fori=0to5:forj=0to2:readrh(i,j),rl(i,j):next:next
  122. 1180 data5,3,3,0,3,1,4,2,3,0,3,1,3,0,3,0,3,1,3,0,3,0,3,1,3,0,3,0,3,1,3,0,3,0,3,1
  123. 1190 ic$(0)="crescents":ic$(1)="horns":ic$(2)="bells":ic$(3)="tierworlds"
  124. 1200 cs$="        "
  125. 1210 fori=0to2:gx(i)=3+9*i:gy(i)=8:next:fori=3to5:gx(i)=3+9*(i-3):gy(i)=17:next
  126. 1220 fori=704to751:pokei,255:next:fori=752to767:pokei,0:next
  127. 1230 fori=2040to2047:pokei,11:next:v=53248:pokev+16,0:pokev+29,0:pokev+23,0
  128. 1240 pokev+27,255:pokev+21,0:pokev+39,12:fori=40to46:pokev+i,8:next
  129. 1250 fori=0to9:sx(i)=60+i*24:sy(i)=114:next:sx(9)=22
  130. 1260 fori=11to14:sx(i)=68+(i-10)*40:sy(i)=154:next
  131. 1270 sx(10)=60:sy(10)=154:sx(15)=22:sy(15)=154
  132. 1280 sys49152,chr$(13)+"[145][157]",20,20,10,10
  133. 1290 gosub4880:rem get name
  134. 1300 open2,dv,2,"vt."+pl$(6)
  135. 1310 input#2,gp
  136. 1320 fori=0to6:input#2,pt(i):next
  137. 1330 close2
  138. 1340 open15,dv,15:input#15,a,a$,a,a:close15
  139. 1350 fori=19to22:syssc+6,2,i,"[149][158][146]"+left$(sp$,36):next
  140. 1360 syssc+6,7,22,"[202][213][211][212] [193] [211][197][195] - [195][207][213][206][212][201][206][199] [201][203][207][206][211]"
  141. 1370 fori=0to5:hl=204*256+(gy(i)-1)*40+gx(i)-2:forj=0to7:pokehl+j,12:next:next
  142. 1380 poke53280,11:gosub400:gosub600:gosub330:m=1:gd=0:gp=gp+1
  143. 1390 fori=0to5:rg(i)=0:next
  144. 1400 forpl=0to6:gosub680:next
  145. 1410 syssc+6,2,22,"[149][158]"+left$(sp$,36)
  146. 1420 :
  147. 1430 :rem screen setup
  148. 1440 :
  149. 1450 syssc+6,2,20,"[144][149]":fori=0to9:syssc+6,3+i*3,19,b$(pc(6,i)):next
  150. 1460 syssc+6,4,22,"[158][149]"+left$(sp$,30)
  151. 1470 syssc+6,33,20,"[211][195][207][210][197]"
  152. 1480 fori=0to9:syssc+6,2+3*i,22,"[129]   [157][157][157]"+str$(v(6,pc(6,i))):next
  153. 1490 syssc+6,33,22,"    [157][157][157][157]"+str$(ps(6))
  154. 1500 ifgd=6then4440
  155. 1510 fori=0to5:syssc+6,gx(i),gy(i),"[152][144]    [157][157][157][157]"+str$(ps(i)):next
  156. 1520 ifrg(rr(g))thenhl=204*256+(gy(g)-1)*40+gx(g)-2:fori=0to7:pokehl+i,11:next
  157. 1530 :
  158. 1540 :rem menu loop
  159. 1550 :
  160. 1560 fori=1to4:syssc+6,30,11+i,"[153]"+m$(i):next
  161. 1570 syssc+6,30,11+m,""+m$(m)
  162. 1580 poke198,0
  163. 1590 geta$:ifa$=""then1590
  164. 1600 gosub5100
  165. 1610 ifa$="t"thenm=1:goto1710
  166. 1620 ifa$="r"thenm=2:goto1710
  167. 1630 ifa$="s"thenm=3:goto1710
  168. 1640 ifa$="c"thenm=4:goto1710
  169. 1650 syssc+6,30,11+m,"[153]"+m$(m)
  170. 1670 ifa$=chr$(13)then1710
  171. 1680 ifa$="[145]"thenm=m-1:ifm<1thenm=4
  172. 1690 ifa$=""thenm=m+1:ifm>4thenm=1
  173. 1700 goto1570
  174. 1710 onmgosub1770,2970,3550,3950
  175. 1720 ifm=1then1450
  176. 1730 goto1560
  177. 1740 :
  178. 1750 :rem trade
  179. 1760 :
  180. 1770 gosub330:gd=gd+1
  181. 1780 syssc+6,30,12,"[153] [212][210][193][196][197] "
  182. 1790 syssc+6,30,13," [215][201][212][200]  "
  183. 1800 syssc+6,30,14," [215][200][201][195][200] "
  184. 1810 syssc+6,30,15," [204][207][210][196]? "
  185. 1820 g=0
  186. 1830 syssc+6,gx(g)-2,gy(g),"[152]"+cs$
  187. 1840 syssc+6,gx(g),gy(g),"[144]"+str$(ps(g))
  188. 1850 geta$:ifa$=""then1850
  189. 1860 gosub5100
  190. 1870 syssc+6,gx(g)-2,gy(g),"[152][152]"+cs$
  191. 1880 syssc+6,gx(g),gy(g),"[144][152]"+str$(ps(g))
  192. 1890 ifa$="j"theng=0:a$=chr$(13)
  193. 1900 ifa$="c"theng=1:a$=chr$(13)
  194. 1910 ifa$="r"theng=2:a$=chr$(13)
  195. 1920 ifa$="a"theng=3:a$=chr$(13)
  196. 1930 ifa$="k"theng=4:a$=chr$(13)
  197. 1940 ifa$="p"theng=5:a$=chr$(13)
  198. 1950 ifa$=chr$(13)andrg(rr(g))=0then2020
  199. 1960 ifa$=chr$(13)andrg(rr(g))=1thengosub5180:goto1830
  200. 1970 ifa$="[145]"theng=g-3:ifg<0theng=g+6
  201. 1980 ifa$=""theng=g+3:ifg>5theng=g-6
  202. 1990 ifa$=""theng=g+1:ifg=3org=6theng=g-3
  203. 2000 ifa$="[157]"theng=g-1:ifg=-1org=